#
# @lc app=leetcode.cn id=9 lang=python3
#
# [9] 回文数
#

# @lc code=start


class Solution:
    def isPalindrome(self, x: int) -> bool:
        if x < 0:
            return False
        else:
            r = 0
            cmp = x
            while x != 0:
                r = r * 10 + x % 10
                x //= 10
            if r == cmp:
                return True
            else:
                return False

# @lc code=end
